Optimal. Leaf size=46 \[ \frac {x}{a+b}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{\sqrt {a} d (a+b)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3660, 3675, 205} \[ \frac {x}{a+b}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{\sqrt {a} d (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 3660
Rule 3675
Rubi steps
\begin {align*} \int \frac {1}{a+b \coth ^2(c+d x)} \, dx &=\frac {x}{a+b}-\frac {b \int \frac {\text {csch}^2(c+d x)}{a+b \coth ^2(c+d x)} \, dx}{a+b}\\ &=\frac {x}{a+b}+\frac {b \operatorname {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\coth (c+d x)\right )}{(a+b) d}\\ &=\frac {x}{a+b}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{\sqrt {a} (a+b) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 47, normalized size = 1.02 \[ \frac {\tanh ^{-1}(\tanh (c+d x))-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{\sqrt {a}}}{d (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.43, size = 488, normalized size = 10.61 \[ \left [\frac {2 \, d x + \sqrt {-\frac {b}{a}} \log \left (\frac {{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \left (d x + c\right )^{4} - 2 \, {\left (a^{2} - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{2} - a^{2} + b^{2}\right )} \sinh \left (d x + c\right )^{2} + a^{2} - 6 \, a b + b^{2} + 4 \, {\left ({\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{3} - {\left (a^{2} - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - 4 \, {\left ({\left (a^{2} + a b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{2} + a b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{2} + a b\right )} \sinh \left (d x + c\right )^{2} - a^{2} + a b\right )} \sqrt {-\frac {b}{a}}}{{\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a + b\right )} \sinh \left (d x + c\right )^{4} - 2 \, {\left (a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} - a + b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} - {\left (a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a + b}\right )}{2 \, {\left (a + b\right )} d}, \frac {d x - \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a + b\right )} \sinh \left (d x + c\right )^{2} - a + b\right )} \sqrt {\frac {b}{a}}}{2 \, b}\right )}{{\left (a + b\right )} d}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 65, normalized size = 1.41 \[ -\frac {\frac {b \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} - a + b}{2 \, \sqrt {a b}}\right )}{\sqrt {a b} {\left (a + b\right )}} - \frac {d x + c}{a + b}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 76, normalized size = 1.65 \[ -\frac {\ln \left (\coth \left (d x +c \right )-1\right )}{d \left (2 b +2 a \right )}+\frac {\ln \left (\coth \left (d x +c \right )+1\right )}{d \left (2 b +2 a \right )}+\frac {b \arctan \left (\frac {\coth \left (d x +c \right ) b}{\sqrt {a b}}\right )}{d \left (a +b \right ) \sqrt {a b}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 56, normalized size = 1.22 \[ \frac {b \arctan \left (\frac {{\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} - a + b}{2 \, \sqrt {a b}}\right )}{\sqrt {a b} {\left (a + b\right )} d} + \frac {d x + c}{{\left (a + b\right )} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.11, size = 37, normalized size = 0.80 \[ \frac {x}{a+b}+\frac {b\,\mathrm {atan}\left (\frac {b\,\mathrm {coth}\left (c+d\,x\right )}{\sqrt {a\,b}}\right )}{d\,\sqrt {a\,b}\,\left (a+b\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 9.72, size = 294, normalized size = 6.39 \[ \begin {cases} \frac {\tilde {\infty } x}{\coth ^{2}{\relax (c )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\- \frac {d x \tanh ^{2}{\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} + \frac {d x}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} - \frac {\tanh {\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} & \text {for}\: a = - b \\\frac {x}{a} & \text {for}\: b = 0 \\\frac {x}{a + b \coth ^{2}{\relax (c )}} & \text {for}\: d = 0 \\\frac {x - \frac {\tanh {\left (c + d x \right )}}{d}}{b} & \text {for}\: a = 0 \\\frac {2 i a \sqrt {b} d x \sqrt {\frac {1}{a}}}{2 i a^{2} \sqrt {b} d \sqrt {\frac {1}{a}} + 2 i a b^{\frac {3}{2}} d \sqrt {\frac {1}{a}}} - \frac {b \log {\left (- i \sqrt {b} \sqrt {\frac {1}{a}} + \tanh {\left (c + d x \right )} \right )}}{2 i a^{2} \sqrt {b} d \sqrt {\frac {1}{a}} + 2 i a b^{\frac {3}{2}} d \sqrt {\frac {1}{a}}} + \frac {b \log {\left (i \sqrt {b} \sqrt {\frac {1}{a}} + \tanh {\left (c + d x \right )} \right )}}{2 i a^{2} \sqrt {b} d \sqrt {\frac {1}{a}} + 2 i a b^{\frac {3}{2}} d \sqrt {\frac {1}{a}}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________